import 'package:business_plugin/business/config_business/config_business.dart';
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
import 'package:flutter/foundation.dart' show defaultTargetPlatform, kIsWeb, TargetPlatform;

class DefaultFirebaseOptions {
  static FirebaseOptions get currentPlatform {
    if (kIsWeb) {
      throw UnsupportedError(
        'DefaultFirebaseOptions have not been configured for web - '
        'you can reconfigure this by running the FlutterFire CLI again.',
      );
    }
    switch (defaultTargetPlatform) {
      case TargetPlatform.android:
        throw UnsupportedError(
          'DefaultFirebaseOptions have not been configured for android - '
          'you can reconfigure this by running the FlutterFire CLI again.',
        );
      case TargetPlatform.iOS:
        return ios;
      case TargetPlatform.macOS:
        throw UnsupportedError(
          'DefaultFirebaseOptions have not been configured for macos - '
          'you can reconfigure this by running the FlutterFire CLI again.',
        );
      case TargetPlatform.windows:
        throw UnsupportedError(
          'DefaultFirebaseOptions have not been configured for windows - '
          'you can reconfigure this by running the FlutterFire CLI again.',
        );
      case TargetPlatform.linux:
        throw UnsupportedError(
          'DefaultFirebaseOptions have not been configured for linux - '
          'you can reconfigure this by running the FlutterFire CLI again.',
        );
      default:
        throw UnsupportedError(
          'DefaultFirebaseOptions are not supported for this platform.',
        );
    }
  }

  // static const FirebaseOptions ios = FirebaseOptions(
  //   apiKey: 'AIzaSyDqxHsrr6YFFmvRwIMNSMfcpXXQO16nM_Q',
  //   appId: '1:915105936206:ios:4eb3a7e8f7bc9e169f641f',
  //   messagingSenderId: '915105936206',
  //   projectId: 'fast-compressor-cleaner',
  //   storageBucket: 'fast-compressor-cleaner.appspot.com',
  //   iosBundleId: 'com.quicker.smarter.cleaner',
  // );

  static FirebaseOptions get ios {
    return FirebaseOptions(
      apiKey: ConfigBusiness.config.apiKey,
      appId: ConfigBusiness.config.appId, 
      messagingSenderId: ConfigBusiness.config.messagingSenderId,
      projectId: ConfigBusiness.config.projectId,
      storageBucket: ConfigBusiness.config.storageBucket,
      iosBundleId: ConfigBusiness.config.iosBundleId
    );
  }
}
